﻿<%@ Page Title="" Language="C#" Theme="Default_Themes" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DanhSachDonViGiaiThe.aspx.cs" Inherits="DanhMuc_DanhSachDonViGiaiThe" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="udt1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pncontent" runat="server">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="box">
                            <div class="box-title">
                                <h3><i class="icon-file"></i>Danh sách các đơn vị bị giải thể</h3>
                            </div>
                            <div class="box-content" style="border: 1px solid #B6D1F2;">
                                <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="MaDonVi" EnableTheming="True" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCommand="grid_RowCommand">
                                    <AlternatingRowStyle BackColor="White" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="Mã Đơn Vị" SortExpression="MaDonVi">
                                            <ItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("MaDonVi") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Tên Đơn Vị" SortExpression="TenDonVi">
                                            <ItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("TenDonVi") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Địa Chỉ" SortExpression="DiaChi">
                                            <ItemTemplate>
                                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("DiaChi") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Điện Thoại" SortExpression="DienThoaiBan">
                                            <ItemTemplate>
                                                <%#Eval("DienThoaiBan")%>-<%#Eval("DienThaoiDiDong") %>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Fax" SortExpression="Fax">
                                            <ItemTemplate>
                                                <asp:Label ID="Label6" runat="server" Text='<%# Bind("Fax") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Email" SortExpression="Email">
                                            <ItemTemplate>
                                                <asp:Label ID="Label7" runat="server" Text='<%# Bind("Email") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Website" SortExpression="Website">
                                            <ItemTemplate>
                                                <asp:Label ID="Label8" runat="server" Text='<%# Bind("Website") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Lãnh Đạo" SortExpression="LanhDao">
                                            <ItemTemplate>
                                                <asp:Label ID="Label9" runat="server" Text='<%# Bind("LanhDao") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày Thành Lập" SortExpression="NgayThanhLap">
                                            <ItemTemplate>
                                                <%# (Eval("NgayThanhLap")!=null?string.Format("{0:dd/MM/yyyy}",Eval("NgayThanhLap")):"")%>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Thông tin giải thể">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButtonGiaiThe" runat="server" CausesValidation="false"
                                                    CommandName="cmdGiaiTheCSD" CommandArgument='<%#Eval("MaDonVi") %>' Text="<i class='icon-file-text-alt red'></i> Chi tiết"></asp:LinkButton>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Xóa">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButtonXoaGiaiThe" runat="server" CausesValidation="false" OnClientClick="return confirm('Có chắc là sẽ xóa không?')"
                                                    CommandName="cmdXoaGiaiTheCSD" CommandArgument='<%#Eval("MaDonVi") %>' Text="<i class='icon-remove red'></i> Xóa"></asp:LinkButton>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <EditRowStyle BackColor="#2461BF" />
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#EFF3FB" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <asp:Panel ID="pndetail" runat="server" Visible="false">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="box">
                            <div class="box-title">
                                <h3><i class="icon-file"></i>Thông tin giải thể</h3>
                                <div style="float:right;">
                                    <asp:LinkButton ID="btnclose" Visible="true" runat="server" OnClick="btnclose_Click" class="btn  btn-danger" ><i class="icon-signout"></i> Đóng</asp:LinkButton>
                                </div>
                            </div>
                            <div class="box-content control-group info" style="border: 1px solid #B6D1F2;">
                                <label class="control-label" style="width: 200px; padding-right: 10px;">Số quyết định giải thể</label>
                                <input type="hidden" id="txtmadonvigiaithe" runat="server" />
                                <div class="controls">
                                    <asp:TextBox ID="txtSoQuyetDinh" ReadOnly="true" runat="server" CssClass="span3" onblur="KiemTraInjection(this);"></asp:TextBox>
                                </div>
                                <div style="height: 5px;"></div>
                                <label class="control-label" style="width: 200px; padding-right: 10px;">Ngày giải thể</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtNgayGiaiThe" ReadOnly="true" runat="server" CssClass="span3" onblur="KiemTraInjection(this);"></asp:TextBox>
                                </div>
                                <div style="height: 5px;"></div>
                                <label class="control-label" style="width: 200px; padding-right: 10px;">Lý do bị giải thể</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtLyDo" runat="server" ReadOnly="true" CssClass="span5" TextMode="MultiLine" Height="50px" onblur="KiemTraInjection(this);"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type = "text/javascript">
        function RadioCheck(rb) {
            var gv = document.getElementById("<%=grid.ClientID%>");
            var rbs = gv.getElementsByTagName("input");
            var row = rb.parentNode.parentNode;
            for (var i = 0; i < rbs.length; i++) {
                if (rbs[i].type == "radio") {
                    if (rbs[i].checked && rbs[i] != rb) {
                        rbs[i].checked = false;
                        break;
                    }
                }
            }
        }
    </script>
    <br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br>
</asp:Content>

